package cn.jtcoding.xhs.service.impl;

import cn.jtcoding.xhs.dao.NoteDao;
import cn.jtcoding.xhs.model.convert.NoteConvert;
import cn.jtcoding.xhs.model.dataobject.NoteDO;
import cn.jtcoding.xhs.model.vo.NoteVO;
import cn.jtcoding.xhs.service.NoteService;
import cn.jtcoding.xhs.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author jason.tang
 * @Date 2020/8/4 17:49
 * @Desc
 */

@Service
public class NoteServiceImpl implements NoteService {

    @Autowired
    private NoteDao noteDao;
    @Autowired
    private UserService userService;
    @Autowired
    private TopicService topicService;

    @Override
    public List<NoteVO> getNotesByCategoryNum(Integer categoryNum) {
        List<NoteDO> noteDOList = noteDao.getNotesByCategoryNum(categoryNum);
        List<NoteVO> noteVOs = NoteConvert.INSTANCE.notesToVO(noteDOList);
        for (NoteVO noteVO : noteVOs) {
            topicService.getTopicTagByTagNum()
        }
        return null;
    }
}
